package com.example.mapper;
import com.example.pojo.Brand;
import com.example.pojo.Good;
import com.opencsv.CSVReader;
import com.opencsv.exceptions.CsvValidationException;
import org.apache.ibatis.annotations.*;

import java.io.FileReader;
import java.io.IOException;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.List;

@Mapper
public interface BrandMapper {
    /**
     * 获取品牌信息
     * @return
     */
    List<Brand> getBrand(Brand brand);
    @Select("select * from brand")
    List<Brand> getBrandList();

    @Delete("delete from brand where brdCode= #{id}")
    void deleteBrand(String id);

    @Insert("INSERT INTO brand values (#{brdCode},#{brdName},#{brdWeb},#{brdImg})")
    void addBrand(Brand brand);

    @Update("UPDATE brand set brdCode=#{brdCode},brdName=#{brdName},brdWeb=#{brdWeb},brdImg=#{brdImg} where brdCode=#{brdCode}")
    void changeBrand(Brand brand);
}